<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>显示层级</title>
  <style>
    #d1{
      width: 50px;
      height: 200px;
      background-color: red;
      position: absolute;
      /*控制元素的显示层级 ,值越大显示越靠前*/
      z-index: 1;

    }
    #d2{
      width: 200px;
      height: 50px;
      background-color: blue;
      position: absolute;
    }
    #d3{
      width: 200px;
      height: 200px;
      /*设置超出部分是否显示 hidden隐藏 scroll滚动显示*/
      /*overflow: hidden;*/
      overflow: scroll;/**/
    }
  </style>
</head>
<body>
<div id="d1"></div>
<div id="d2"></div>
<div id="d3">
  <img src="../b.jpg" alt="">
</div>

</body>
</html>